const router = require('koa-router')()
const middle = require('../middlewares')
const Foundation = require('../service/foundation')

/**
 * item list
 */
router.get('/', middle.pagination, async function(ctx, next) {})


router.get('/workflow/:id/snapshot', async function(ctx, next) {
    const {
        id
    } = ctx.params

    const snapshots = await Foundation.snapshotById(id)

    ctx.send({
        snapshots
    })
})


module.exports = router